package com.atguigu.condition;

import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

/**
 * @author gcq
 * @Create 2020-09-22
 */
public class MyImplortSelector implements ImportSelector {
    /**
     *
     * @param importingClassMetadata 当前标注@Import注解的所有注解信息
     * @return 导入到容器中的组件全类名
     */
    public String[] selectImports(AnnotationMetadata importingClassMetadata) {
        // 返回需要导入组件的全类名
        return new String[]{"com.atguigu.bean.Red"};
    }
}